package com.wing.others.controller;


import com.wing.common.utils.JsonResult;
import com.wing.others.entity.request.OthersCreateRequest;
import com.wing.others.service.OthersService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 畅捷通-材料出库-其他出库
 */
@Validated
@Api(value = "畅捷通-其他出库管理", tags = "#/chanjet/others")
@RestController("OthersController")
@RequestMapping("others/admin/others")
@RequiredArgsConstructor
public class OthersController {

    @Resource
    OthersService purchaseService;

    /**
     * 创建销售出库单
     */
    @ApiOperation(value = "创建其他出库单", notes = "保存")
    @PostMapping("/syncOutSalesDispatch")
    public JsonResult syncOutSalesDispatch(@RequestBody OthersCreateRequest othersCreateRequest) {
        return JsonResult.success(purchaseService.syncOutOthersDispatch(othersCreateRequest));
    }



}
